#! /usr/bin/env python

# this script used to erase lines contain _R


def quR(filename, outfile):
	f = open(filename,"r")
	f1 = f.readlines()
	for i in range(1,len(f1)):
		if re.search('_R',f1[i]):
			f1[i]=''
	f2 = open(outfile,'w')
	f2.writelines(f1)
	f.close()
	f2.close() 

if __name__ == '__main__':
	import re,sys
	if len(sys.argv) == 1:
		print "usage: python quR.py bedfile outfile"
	else:
		quR(sys.argv[1], sys.argv[2])
		
